package huawei.exam1;

import java.util.LinkedHashSet;
import java.util.Scanner;
import java.util.Set;
import java.util.Stack;

/**
 * @author : Rookie
 * @description :
 * @date : 2022/12/16
 */
public class HJ9 {

    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        String input = scanner.nextLine();
        Stack<Character> characters = new Stack<>();
        for (int i = 0; i < input.length(); i++) {
            characters.add(input.charAt(i));
        }
        Set<Character> hashSet = new LinkedHashSet<>();
        while (!characters.isEmpty()) {
            hashSet.add(characters.pop());
        }
        StringBuffer sb = new StringBuffer();
        hashSet.forEach(sb::append);
        System.out.println(sb);
    }
}
